//
//  DragTextField.m
//  sqliteToEnity
//
//  Created by hament on 13-8-8.
//  Copyright (c) 2013年 hament. All rights reserved.
//

#import "DragTextField.h"

@implementation DragTextField

- (id)initWithFrame:(NSRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code here.
    }
    
    return self;
}

- (void)drawRect:(NSRect)dirtyRect
{
    // Drawing code here.
}

/*
//- (BOOL) acceptsFirstMouse:(NSEvent *)theEvent
//{
//    return YES;
//}


-(void)mouseDown:(NSEvent *)theEvent {
    [super mouseDown:theEvent];
    //NSPoint  point=[self convertPoint:theEvent.locationInWindow fromView:nil];
    NSPoint  point=theEvent.locationInWindow ;

    if (NSPointInRect(point, self.frame)) {
       // NSLog(@"down");
       
    }
    
    
//    if ([self.stringValue isEqualToString:@""] ||self.stringValue==nil){
//    
//        [self setSelectable:YES];
//    
//    } else {
//    
//        [self setSelectable:Yes];
//    }

}




-(void)mouseUp:(NSEvent *)theEvent {
    [super mouseUp:theEvent];
    //NSPoint  point=[self convertPoint:theEvent.locationInWindow fromView:nil];
    NSPoint  point=theEvent.locationInWindow ;
    
    if (NSPointInRect(point, self.frame)) {
       // NSLog(@"up");
        return;
    }
    
}


-(void)mouseDragged:(NSEvent *)theEvent {
    [super mouseDragged:theEvent];
    //NSPoint  point=[self convertPoint:theEvent.locationInWindow fromView:nil];
    NSPoint  point=theEvent.locationInWindow ;
    
    if (NSPointInRect(point, self.frame)) {
        NSLog(@"drag");
        return;
    }
    
}
*/

@end
